import config from "@/config"
import http from "@/utils/request"

export default {
  getArtWork: {
    url: `${config.API_URL}/cms/theatre/artwork/list`,
    name: "获取产品列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  artWorkDetail: {
    url: `${config.API_URL}/cms/theatre/artwork/`,
    name: "获取产品详情",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  getTheatreData: {
    url: `${config.API_URL}/cms/common/theatre/search`,
    name: "获取剧院列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  getArtwrokData: {
    url: `${config.API_URL}/cms/common/artwork/search`,
    name: "获取赠品artwrok列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  artWorkUpload: {
    url: `${config.API_URL}/cms/theatre/view`,
    name: "更新编辑产品",
    post: async function(data){
      return await http.post(this.url,data)
    }
  },
  artWorkCreate: {
    url: `${config.API_URL}/cms/creator/artwork/create`,
    name: "上传产品",
    post: async function(data = {}){
      return await http.post(this.url,data)
    }
  },
  setCinemaArtworkStatus: {
    url: `${config.API_URL}/cms/theatre/artwork/status`,
    name: "产品操作",
    post: async function(data){
      return await http.post(this.url,data)
    }
  },
  delMovie: {
    url: `${config.API_URL}/cms/creator/artwork/`,
    name: "删除artwork数据",
    delete: async function(params){
        return await http.delete(this.url+params);
    }
  }
}